/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package systole.domain.report.template;

import java.io.Serializable;

/**
 *
 * @author jmj
 */
public abstract class Observation implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = -8960806429921097113L;
    private Integer id;
    private String name;
    private String text;
    private boolean female;
    private boolean male;

    /**
     * @return the id
     */
    public Integer getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return this.name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the text
     */
    public String getText() {
        return this.text;
    }

    /**
     * @param text the text to set
     */
    public void setText(String text) {
        this.text = text;
    }

    /**
     * @return the female
     */
    public boolean isFemale() {
        return this.female;
    }

    /**
     * @param female the female to set
     */
    public void setFemale(boolean female) {
        this.female = female;
    }

    /**
     * @return the male
     */
    public boolean isMale() {
        return this.male;
    }

    /**
     * @param male the male to set
     */
    public void setMale(boolean male) {
        this.male = male;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Observation other = (Observation) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 71 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 71 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return this.name;
    }
}
